<div class="form-group name">
  <label>Name</label>
  <input type="text" class="form-control" placeholder="Enter name" data-toggle="tooltip" title="Name of user" value="<%- name %>" autofocus>
</div>
<div class="form-group email">
  <label>Email (optional)</label>
  <input type="email" class="form-control" placeholder="Enter email address" data-toggle="tooltip" title="User email address" value="<%- email ? email : '' %>">
</div>
<div class="form-group groups">
  <label>Groups</label>
  <div class="groups-label" data-toggle="tooltip" title="Enter space seperated list of groups to associate with user. Names are case sensitive.">
    <input type="text" placeholder="Enter groups" value="<%- groups ? groups.join(',') : '' %>">
  </div>
</div>
<div class="form-group pin">
  <label>Pin</label>
  <input type="password" class="form-control" placeholder="Enter user pin"
    data-toggle="tooltip" title="User pin, required when user connects to vpn. When using with two-factor authentication the pin and two-factor authentication code should both be placed in the password field."
    value="<%- pin ? '******' : '' %>">
</div>
<div class="form-group yubikey-id" <%= bypass_secondary !== true && auth_type === 'yubico' ? '' : 'style="display: none"' %>>
  <label>YubiKey ID</label>
  <input type="text" class="form-control" maxlength="12" placeholder="Insert YubiKey" data-toggle="tooltip" title="Insert and touch YubiKey to get ID. Requires Yubico API credentials in settings." value="<%- yubico_id %>">
</div>
<div class="form-group port-forwarding">
  <label>Port Forwarding</label>
  <input type="text" class="form-control"
    placeholder="Enter port mappings" data-toggle="tooltip"
    title="Enter comma seperated list of ports to forward using format source_port:dest_port/protocol or start_port-end_port/protocol. Such as 21, 80/tcp, 80:8000/tcp, 1000-2000/udp."
    value="<%- portForwardingFormatted %>">
</div>
<div class="form-group network-links">
  <label>Network Link</label>
  <input type="text" class="form-control"
    placeholder="Enter network address" data-toggle="tooltip"
    title="Enter network address with cidr subnet. This will provision access to a clients local network to the attached vpn servers and other clients. Multiple networks may be separated by a comma. Router must have a static route to VPN virtual network through client."
    value="<%- network_links ? network_links.join(', ') : '' %>">
</div>
<div class="client-to-client-toggle toggle-form form-group">
  <label>Client-to-Client Only</label>
  <div class="selector <%= client_to_client ? 'selected' : '' %> no-select" data-toggle="tooltip" title="Only allow this client to communicate with other clients. Access to routed networks will be blocked.">
    <span class="selector-inner glyphicon glyphicon-ok"></span>
  </div>
</div>
<div class="advanced">
  <div class="form-group auth-type">
    <label>Type</label>
    <select class="form-control" data-toggle="tooltip" title="User authentication type. This will determine how the user authenticates. This should be set automatically when the user authenticates with single sign-on.">
      <option value="local" <%= auth_type === 'local' ? 'selected' : '' %>>Local</option>
      <option value="duo" <%= auth_type === 'duo' ? 'selected' : '' %>>Duo</option>
      <option value="yubico" <%= auth_type === 'yubico' ? 'selected' : '' %>>Yubico</option>
      <option value="azure" <%= auth_type === 'azure' ? 'selected' : '' %>>Azure</option>
      <option value="azure_duo" <%= auth_type === 'azure_duo' ? 'selected' : '' %>>Azure + Duo</option>
      <option value="azure_yubico" <%= auth_type === 'azure_yubico' ? 'selected' : '' %>>Azure + Yubico</option>
      <option value="google" <%= auth_type === 'google' ? 'selected' : '' %>>Google</option>
      <option value="google_duo" <%= auth_type === 'google_duo' ? 'selected' : '' %>>Google + Duo</option>
      <option value="google_yubico" <%= auth_type === 'google_yubico' ? 'selected' : '' %>>Google + Yubico</option>
      <option value="slack" <%= auth_type === 'slack' ? 'selected' : '' %>>Slack</option>
      <option value="slack_duo" <%= auth_type === 'slack_duo' ? 'selected' : '' %>>Slack + Duo</option>
      <option value="slack_yubico" <%= auth_type === 'slack_yubico' ? 'selected' : '' %>>Slack + Yubico</option>
      <option value="saml" <%= auth_type === 'saml' ? 'selected' : '' %>>SAML</option>
      <option value="saml_duo" <%= auth_type === 'saml_duo' ? 'selected' : '' %>>SAML + Duo</option>
      <option value="saml_yubico" <%= auth_type === 'saml_yubico' ? 'selected' : '' %>>SAML + Yubico</option>
      <option value="saml_okta" <%= auth_type === 'saml_okta' ? 'selected' : '' %>>Okta</option>
      <option value="saml_okta_duo" <%= auth_type === 'saml_okta_duo' ? 'selected' : '' %>>Okta + Duo</option>
      <option value="saml_okta_yubico" <%= auth_type === 'saml_okta_yubico' ? 'selected' : '' %>>Okta Yubico</option>
      <option value="saml_onelogin" <%= auth_type === 'saml_onelogin' ? 'selected' : '' %>>OneLogin</option>
      <option value="saml_onelogin_duo" <%= auth_type === 'saml_onelogin_duo' ? 'selected' : '' %>>OneLogin Duo</option>
      <option value="saml_onelogin_yubico" <%= auth_type === 'saml_onelogin_yubico' ? 'selected' : '' %>>OneLogin Yubico</option>
      <option value="radius" <%= auth_type === 'radius' ? 'selected' : '' %>>Radius</option>
      <option value="radius_duo" <%= auth_type === 'radius_duo' ? 'selected' : '' %>>Radius + Duo</option>
      <option value="plugin" <%= auth_type === 'plugin' ? 'selected' : '' %>>Plugin</option>
    </select>
  </div>
  <div class="form-group mac-addresses">
    <label>Allowed MAC Addresses</label>
    <input type="text" class="form-control"
           placeholder="Enter MAC address" data-toggle="tooltip"
           title="Comma separated list of MAC addresses client is allowed to connect from. The validity of the MAC address provided by the VPN client cannot be verified."
           value="<%- mac_addresses ? mac_addresses.join(', ') : '' %>">
  </div>
  <div class="form-group dns-servers">
    <label>DNS Forwarding Server</label>
    <input type="text" class="form-control"
      placeholder="Enter dns server" data-toggle="tooltip"
      title="Enter dns server with port to forward sub-domain dns requests coming from this users domain. Multiple dns servers may be separated by a comma."
      value="<%- dns_servers ? dns_servers.join(', ') : '' %>">
  </div>
  <div class="form-group dns-suffix">
    <label>DNS Forwarding Suffix</label>
    <input type="text" class="form-control"
      placeholder="Enter dns suffix" data-toggle="tooltip"
      title="Enter the suffix to use when forwarding dns requests. The full dns request will be the combination of the sub-domain of the users dns name suffixed by the dns suffix."
      value="<%- dns_suffix ? dns_suffix : '' %>">
  </div>
  <div class="bypass-secondary-toggle toggle-form form-group">
    <label>Bypass Secondary Authentication</label>
    <div class="selector <%= bypass_secondary ? 'selected' : '' %> no-select" data-toggle="tooltip" title="Bypass secondary authentication such as two-factor authentication. Use for server users that can't provide a two-factor code.">
      <span class="selector-inner glyphicon glyphicon-ok"></span>
    </div>
  </div>
</div>
